<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增人员')"/>
    <th:block th:include="include :: select2-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-person-add">
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">人员姓名：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="name" placeholder="请输入人员姓名" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">人员类型：</label>
            <div class="col-sm-8">
                <select name="personType" class="form-control m-b">
                    <option value="">请选择</option>
                    <option th:each="personType : ${personType}" th:text="${personType.paramValue}"
                            th:value="${personType.id}"></option>
                </select>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: select2-js"/>
<script>
    var prefix = ctx + "person";

    function submitHandler() {
        if ($.validate.form()) {
            var data = $("#form-person-add").serializeArray();
            $.operate.save(prefix + "/save", data);
        }
    }

</script>
</body>
</html>